<?php
namespace app\validate;

use think\Validate;

class CheckCategory extends Validate
{

    protected $rule =   [
        'name'  => 'require|length:1,50',
        'e_name'  => 'require|length:1,50',
        'icon'  => 'require',
        'icon_pc'  => 'require',
        'icon_pc_on'  => 'require',
    ];

    protected $message  =   [
        'name.require' => '请输入分类名称(CN)！',
        'name.length' => '分类名称(CN)在1-50个字符！',
        'e_name.require' => '请输入分类名称(EN)！',
        'e_name.length' => '分类名称(EN)在1-50个字符！',
        'icon.require' => '请选择或上传分类图标！',
        'icon_pc.require' => '请选择或上传pc未选中图标！',
        'icon_pc.icon_pc_on' => '请选择或上传pc选中图标！',
    ];

}